#ifndef _STM32SERVER_H_
#define _STM32SERVER_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "queueserver.h"


typedef struct communivation
{
    char *QT_shm_fd;
    char *ali_shm_fd;
    int *socket_ptr;
}comm;

#define IP_ADDRESS 192.168.0.154
#define PORT 8880
#define BUFFER_SIZE 1024
#define QT_KEY_PATHNAME "/home/qwe/1.c"
#define QT_KEY_ID 106
#define ALI_KEY_PATHNAME "/home/qwe/1.c"
#define ALI_KEY_ID 108

extern char buffer[BUFFER_SIZE];
extern int tcpconnect_flag;
extern pthread_mutex_t lock;

//pthread_mutex_t lock;


void *create_shared_memory(int *shm_fd,const char *pathname,const int keyid );
int STM32_TCP_server(int *tcp_connectsocketfd,int *tcp_acceptsocketfd );

#endif
